package com.sky.mapper;

import com.sky.annotation.AutoFillFlag;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {

    //新增口味
    @Insert("INSERT INTO dish_flavor (dish_id, name, value) value (#{dishId},#{name},#{value})")
    public void addDishFlavor(DishFlavor dishFlavor);

    //根据菜品id查询菜品口味
    @Select("select * from dish_flavor where dish_id=#{id}")
    public List<DishFlavor> findDIshById(Long id);

    //删除菜品口味
    public void deleteFlavor(Long id);

    //批量删除菜品口味
    public void dropDishFlavor(List<Long> ids);
}
